#include "sfc/test.h"

namespace sfc::fmt {

sfc_test(i32_) {
  auto i = -123;
  auto u = +123;

  log::warn("[{+5}], [{-5}], [{5}]", i, i, i);
  log::warn("[{+5}], [{-5}], [{5}]", u, u, u);
  log::warn("[{>5}], [{<5}], [{^5}], [{=5}]", i, i, i, i);
}

sfc_test(i64_) {
  auto i = -123456l;
  auto u = +123456l;
  log::info("[{+5}], [{-5}], [{5}]", i, i, i);
  log::info("[{+5}], [{-5}], [{5}]", u, u, u);
  log::info("[{>5}], [{<5}], [{^5}], [{=5}]", i, i, i, i);
}

sfc_test(u32_) {
  auto u = 0xFFu;
  log::debug("[{5b}], [{5o}], [{5x}]", u, u, u);
  log::debug("[{#5b}], [{#5o}], [{#5x}]", u, u, u);
  log::debug("[{>#5x}], [{<#5x}], [{^#5x}], [{=#5x}]", u, u, u, u);
}

sfc_test(f32) {
  auto i = -9.99999;
  auto u = +9.99999;
  log::info("[{<+8.4}], [{>8.4}], [{^8.4}], [{=8.4}]", i, i, i, i);
  log::info("[{<+8.4f}], [{>8.4f}], [{^8.4f}], [{=8.4f}]", i, i, i, i);
  log::info("[{<+8.4}], [{>8.4}], [{^8.4}], [{=8.4}]", u, u, u, u);
  log::info("[{<+8.4f}], [{>8.4f}], [{^8.4f}], [{=8.4f}]", u, u, u, u);
}

}  // namespace sfc::fmt
